package com.kc.business.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.kc.business.domain.dto.BizGoodsRecommendListDTO;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 旅知模块表数据
 */
@Data
@Table(name = "kc_creation")
public class BizCreation {
    /*创作表主键id*/
    @Id
    private Integer id;
    /*创作类别*/
    @NotBlank(message = "所属类别不能为空")
   // @Min(value = 1,message = "创作类别错误")
    private String type;
    /*类别对应名称*/
    @Transient
    private String typeName = "";
    /*图片，多张图以","分割的不对外显示*/
    //@JsonIgnore
    //@NotNull(message = "图片数据不能为空")
    private String[] imageList;
    private String image;
    /*图片尺寸相关数据*/
    //@JsonIgnore
    private String imgageAttr = "";
    /*图片列表，上面图片字符串拆分,此字段不写入数据表*/
   // @Transient
    //@JsonProperty("image_list")
    //private List<String> imageList = new ArrayList<>();
    /*标题*/
    @NotNull(message = "标题不能为空")
    private String title = "";
    /*简介*/
    @NotNull(message = "介绍不能为空")
    private String synopsis = "";
    /*视频地址*/
    private String videoUrl = "";
    /*视频时长*/
    private Integer videoTime = 0;
    /*提交时间*/
    @JsonIgnore
    private Date createTime = new Date();
    /*状态:0待审核，1已审核，2已拒绝*/
    private String status;
    @Transient
    private String statusName = "";
    /*创作时间*/
    private String creationTime = "";
    /*创作地点*/
    private String creationAddress = "";
    /*创作者昵称*/
    @Transient
    private String nickname = "";
    /*是否官方*/
    private Integer isOfficial = 0;
    /*创作者id*/
    private Integer userId = 0;
    /*主体id,景区景点id*/
    //@JsonIgnore
    @NotNull(message = "所属景区不能为空")
    @Min(value = 0,message = "景区id错误")
    //@TableField("scenicId")
    @Transient
    private Integer themeId = 0;
    private Integer scenicId = 0;
    /*是否删除状态*/
    private Integer isDeleted = 0;
    /*推荐商品ids(出入参不入库)*/
    @Transient
    private String[] goodsIds;

    private String goodsId = "";
    @Transient
    private List<BizGoodsRecommendListDTO> goodsRecommendListDTOS;
    @Transient
    private String scenicName;
}
